public class User {

    private String name; // 用户名

    private double money; // 用户抢了多少钱

    // 构造器
    public User() {
    }

    // 给用户名赋值
    public User(String name) {
        this.name = name;
    }

    public void in(Double money) {
        this.money += money; // 红包抢到的钱加到自己的账户里面
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", money=" + money +
                '}';
    }
}
